package client;

import java.io.IOException;

/**
 * The main class of the client; execute to start the client.
 * 
 * @author Lukas
 *
 */
public class Client {

	/**
	 * @param args host, tcpPort and udpPort
	 */
	public static void main(String[] args) {
		if (args.length != 3) {
			System.out.println("Usage: java Client <host> <tcpPort> <udpPort>");
			return;
		}
		try {
			(new Thread(new InputSender(args[0], Integer.parseInt(args[1]), Integer.parseInt(args[2])))).start();
		} catch (NumberFormatException e) {
			System.out.println("Usage: java Client <host> <tcpPort> <udpPort>");
			System.out.println("<tcpPort> and <udpPort> must be a number");
		} catch (IOException e) {
			System.err.println("Could not create service");
		}
	}

}
